// 分页信息
export type Pagination = {
  page: number,
  pageSize: number,
  sortBy: string,
  sortOrder: string
};

// 创建图形验证码配置
export type SvgCaptchaOptions = {
  // 验证码长度
  size?: number,
  // 验证码字符中排除 例：'0o1i'
  ignoreChars?: string,
  // 干扰线条的数量
  noise?: number,
  // 验证码的字符是否有颜色，默认没有，如果设定了背景，则默认有
  color?: boolean,
  // 验证码图片背景颜色, 例："#cc9966"
  background?: string
};

declare module "koa" {
  export interface Context {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    reqParams: Record<any, any>;
    reqPagination?: Pagination;
  }
}

declare module "koa-router" {
  export interface IRouterParamContext {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    reqParams: Record<any, any>;
  }
}
